/*
 * Copyright (c) 2006-2020, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-11-15     CubeLine       the first version
 */
#ifndef APPLICATIONS_PMS7003_H_
#define APPLICATIONS_PMS7003_H_
#endif /* APPLICATIONS_PMS7003_H_ */


int PMS_Serial_init(void);
void PMS_Read(void);
struct PMS7003_Data
{
    uint8_t FrameHeader[2];      //固定起始位0x42，0x4d;
    uint16_t FrameLen;           //帧长度 = 2x13+2 (数据+校验位);
    uint16_t Std_PM1_0;          //CF=1的标准颗粒物下的PM1.0颗粒物浓度，单位ug/m3
    uint16_t Std_PM2_5;          //PM2.5
    uint16_t Std_PM10;           //PM10
    uint16_t Air_PM1_0;          //大气环境下的PM1.0颗粒物浓度，单位ug/m3;
    uint16_t Air_PM2_5;          //PM2.5
    uint16_t Air_PM10;           //PM10
    uint16_t Quan_0_3;           //0.1L空气中0.3mm以上颗粒物个数;
    uint16_t Quan_0_5;           //0.5
    uint16_t Quan_1_0;           //1.0
    uint16_t Quan_2_5;           //2.5vc
    uint16_t Quan_5_0;           //5.0
    uint16_t Quan_10;            //10
    uint8_t Version;             //版本号
    uint8_t ErrorCode;           //错误代码
    uint16_t CheckSum;           //校验和 = 起始符1+xxx2+...数据13低8位。
} PMS_Sensor;
//static int uart_sample(void);
